arrow
{GGPLOT2}
Draw an arrow in a ggplot graph
addmargins
{stats}
Puts Arbitrary Margins on Multidimensional Tables or Arrays
complete.cases
{stats}
Find Complete Cases
median
{stats}
Get median of a vector
geom_segment
{GGPLOT2}
Generates a line segment or curve
expression
{base}
Used in plots to add symbols to axes
grid.arrange
{gridExtra}
Places graphical objects into a rectangular grid
ylab
{GGPLOT2}
Label the y axis (ggplot)
geom_smooth
{GGPLOT2}
Generates a smoothed conditional means curve / line
max
{base}
Get maximum of a vector
ls
{base}
Return a vector of character strings giving the names of the objects in the specified environment
read.csv
{utils}
Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters
prop.test
{stats}
Test of Equal or Given Proportions
View
{base}
View a data frame
contrasts
{stats}
Get and Set Contrast Matrices (find reference category)
dnorm
{stats}
Density distribution for the normal distribution
table
{base}
Obtain frequency table of a variable/cross-tabulation of two variables
scale_y_continuous
{GGPLOT2}
Customise continuous y axis
after_stat
{GGPLOT2}
Control aesthetic evaluation. On the module used for displying percent
ifelse
{base}
Return a or b depending on the value of test
set.seed
{base}
Initialise a pseudorandom number generator.
chisq.test
{stats}
Chi-Squared test (e.g. for cross-tabulations)
arrange
{dplyr}
Sort values of data frame according to a variable/combination of varaibles
plotPlane
{rockchalk}
Draw a 3-D regression plot for two predictors
read_excel
{readxl}
Read an Excel file
log
{base}
log (default base = e)
scale_x_continuous
{GGPLOT2}
Customise continuous x axis
cbind
{base}
Combine R objects by columns
order
{base}
Get indexes that will sort a vector
range
{base}
Return range of values
sd
{stats}
Get standard deviation of a vector
tapply
{base}
Create statistical summaries by group based on the levels of one or several factors
sum
{base}
Get sum of numeric values or a vector
freq
{questionr}
Generate frequency tables
is.element
{base}
Check if a value is element of a vector
names
{base}
Retrieve names of a list/vector
setwd
{base}
Set Working Directory
rnorm
{base}
Generate random numbers from a normal distribution
sample
{base}
Takes a sample of the specified size
filter
{dplyr}
Filter out rows of a data frame according to logical vector
theme_bw
{GGPLOT2}
A black and white ggplot theme
barplot
{graphics}
Plot a simple bar plot
pie
{graphics}
Creates a basic pie chart
runif
{stats}
Draws ranndom numbers from the uniform distribution
theme
{GGPLOT2}
Set theme for GGPLOT2
desc
{dplyr}
Arrange in descending order
droplevels
{base}
Drop Unused Levels from Factors
mean
{base}
Get mean of a vector
dim
{base}
Get dimensions of a data frame
lprop
{questionr}
Display row percentages of a two-way frequency table
summarise
{dplyr}
collapse the dataset to a summary statistic. Usually used with group_by()
theme_classic
{GGPLOT2}
A minimalistic theme with no gridlines
geom_density
{GGPLOT2}
Generates a density plot
xlab
{GGPLOT2}
Label the x axis (ggplot)
bar
{base}
Used for annotations, such as “expression(paste(”-“,bar(y)))”
select
{dplyr}
Select columns from a tibble/data frame
geom_histogram
{GGPLOT2}
Generates a histogram
which
{base}
return indexes of TRUE entries of a logical vector
slice
{dplyr}
Subset rows using their positions
as.numeric
{base}
Coerce a vector to numeric
which.max
{base}
return index of the largest value in a vector
aes
{GGPLOT2}
Construct aesthetic mapping of a ggplot graph
prop.table
{base}
Transform frequency table into table of proportions
predict
{stats}
Predict Probability
geom_point
{GGPLOT2}
Generates a scatter plot
factor
{base}
Create a factor
c
{base}
Combine values/vectors into a vector
ls.str
{utils}
Similarly to ls, with a print() method that calls str() on each object
quantile
{stats}
Obtain empirical quantiles of a vector
with
{base}
evaluate expression in the context of a data frame
summary
{base}
Obtain summary statistics or detailed regression output
install.packages
{base}
Install R package
print
{base}
Print object to the console
rbind
{base}
Combine R objects by rows
ggplot
{GGPLOT2}
Create a ggplot graph
str
{utils}
Get the structure of an R object
confint
{stats}
Calculate confidence Intervals for Model Parameters
cor.test
{stats}
Test for Association/Correlation Between Paired Samples
seq
{base}
Create a sequence
read_dta
{haven}
Read a .dta file (Stata data)
read.spss
{foreign}
Read a .sav file (SPSS data)
boxplot
{graphics}
Plot a simple box plot
geom_hline
{GGPLOT2}
Add a horizontal line in GGPLOT2
geom_ribbon
{GGPLOT2}
Generates an area plot
class
{base}
Retrieve class of an R object
subset
{base}
Return subsets of vectors, matrices or data frames which meet conditions.
relevel
{stats}
Reorder Levels of Factor
library
{base}
Load an R package
recode
{dplyr}
Recode a variable
round
{base}
Rounds numbers
attach
{base}
Attach Set of R Objects to Search Path
unique
{base}
get unique elements
head
{utils}
Show first 5 rows of a data frame
ungroup
{dplyr}
Resolve grouping created with “group_by”
group_by
{dplyr}
Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise
hist
{graphics}
Plot a simple histogram
plot
{graphics}
Generic function from base R to produce a plot
par
{graphics}
Set parameters of the plotting device
coord_flip
{GGPLOT2}
Flip the x and y axes of a graph
element_blank
{GGPLOT2}
This theme element draws nothing, and assigns no space
data.frame
{base}
Create a data.frame from vectors
var
{stats}
Calculate variance
is.na
{base}
Check if a value is NA/elements of vector are NA
ggtitle
{GGPLOT2}
Generates a title for a ggplot graph
as.factor
{base}
Coerce a vector to factor
lm
{base}
Fit a linear model
min
{base}
Get minimum of a vector
geom_bar
{GGPLOT2}
Generates a bar chart
ordered
{dplyr}
Create an ordered factor
scale_colour_manual
{GGPLOT2}
Create your own discrete scale
cor
{stats}
Calculate Correlation Matrix
sample_n
{dplyr}
Sample a number of observations from a data frame
rbeta
{stats}
Beta Random Number Generating Function
cut
{base}
Convert Numeric to Factor
as.data.frame
{base}
Functions to check if an object is a data frame, or coerce it if possible.
colnames
{base}
Retrieve column names of a data frame
stargazer
{stargazer}
Create a regression output table
mutate
{dplyr}
Modify/create a column in a data frame
nrow
{base}
Get number of rows of a data frame
labs
{GGPLOT2}
Customise labels in GGPLOT2
element_text
{GGPLOT2}
Customise text in GGPLOT2
reorder
{stats}
Reorder Levels of Factor based on the values of a second variable, usually numeric.
ncol
{base}
Get number of columns of a data frame
tabulate
{base}
Counts the number of times each integer occurs in an integer-only vector
matrix
{base}
Creates a matrix from the given set of values.
geom_vline
{GGPLOT2}
Draws a vertical line
get_mode
{rstatix}
Compute the mode in a given vector.
t.test
{stats}
Performs one and two sample t-tests on vectors of data.
rm
{base}
Remove objects
levels
{base}
Get levels of a factor
The end!